using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;
using NetduinoHappyHour.Hardware;
using NetduinoHappyHour.Util;

namespace NetduinoHappyHour.Behaviour
{
    /// <summary>
    /// Simple Behaviour, just moved slight forward and backward
    /// </summary>
    public class BackForth : BaseBehaviour, IExecutable
    {
        public void Execute()
        {
            int steps = 2000;
            int delay = 5;//SystemConfig.Instance().DelayStepper;
            gw.ExecuteDriveCommand(new DriveCommand(steps, steps, delay));
            Thread.Sleep(1000);
            gw.ExecuteDriveCommand(new DriveCommand(-steps, -steps, delay));
            //Thread.IsSleepMode(2000);
            SystemStatus.Instance().AddMessage("BackForth executed");
        }
    }
}
